<?php 
header('Content-type:text/html;charset=utf-8');
class Hd{
	//让下面赋值的属性，全部加入到data属性里面，更加省资源
	private $data = array();
	
	public function __set($name,$value){
		//$this->data['test'] = '测试';
		$this->data[$name] = $value;
	}
	
	public function __get($name){
		//return $this->data['test'];
		return $this->data[$name];
	}
	
}
$h = new Hd;
$h->test = '后盾网人人做后盾<br/>';
echo $h->test;

$h->hd = '后盾网人人做后盾<br/>';
echo $h->hd;




 ?>